-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Integer and UInteger types #1009
Conversation
For completness, these datatypes are abstract! If they are used in structs, abstract types are either Variant or ExtensionObjects. If they only contain basic types (int16, float, double..) they are Variants.
# If they are used in structs, abstract types are either Variant or ExtensionObjects. | ||
# If they only contain basic types (int16, float, double..) they are Variants | ||
UInteger = Variant | ||
Integer = Variant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that correct? All data types are defined as
Class UInt32(int):
pass
but Integer should be a Variant type? Looks strnage but there are so many strange things in ua....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sry I forget about it. After digging I am not sure if Variant is correct or ExtensionObject. I only found mention that abstract classes should be ExtensionObjects.
But to your point a abstract class can have an unknown content, that is why either Variant or a ExtenstionObject must be used. Otherwise the decoder can't know how long the data is.
I will look in the specs to find the correct handling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I see, then we should also add Number, Float, etc,... if it is allowed to use them in structs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if it is allowed, but there are servers in the wild that use them.
Will add them if I know which type they should be. I only know of structs that are subtypes and they are ExtensionObjects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not find anything about using these insie a struct but maybe you have better sources...
For completness, these datatypes are abstract! If they are used in structs, abstract types are either Variant or ExtensionObjects.
If they only contain basic types (int16, float, double..) they are Variants.
FreeOpcUa/opcua-client-gui#87